home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_321 / ifs / source / safeclose.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  973b  |  27 lines

  1. /* CloseWindowSafely()
  2. *       This module should be used whenever you are sharing an IDCMP
  3. * message port with more than one window.  Rather than calling CloseWindow(),
  4. * you should use CloseWindowSafely().  This will keep Intuition from
  5. * Guru Meditation, and thus is considered a good thing.  You should still
  6. * use CloseWindow for the very last window you close.
  7. *       The reason this is needed, is because Intuition will re-claim
  8. * any outstanding messages for a window when the window is closed. But...
  9. * it can't take them out of your message port. Thus, you will receive
  10. * invalid messages and bad things will happen.  Very bad things.
  11. *       This code is a slightly condensed version of the same routine
  12. * written by Neil Katin of Amiga for the April '86 Commodore Developers
  13. * Newsletter, Amiga Mail (tm).
  14. */
  15.  
  16. #ifndef SAFECLOSE
  17.  
  18. #define SAFECLOSE
  19.  
  20.  
  21. /* CloseWindowSafely(window), window is pointer to struct Window */
  22.  
  23. extern void CloseWindowSafely();
  24.  
  25. #endif
  26.  
  27.